/*
package com.by.controller;

import com.by.entity.Tb;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Controller
public class FmController {
    @RequestMapping("/toIndex")
    public String toIndex(Model model){
        Tb tb = new Tb(1,"李四",2.777777777,null,new Date());
        model.addAttribute("tb",tb);
        return "index";
    }

    @RequestMapping("/showList")
    public String showList(Model model){
        Tb tb1 = new Tb(1,"李四",2.777777777,null,new Date());
        Tb tb2 = new Tb(2,"王五",2.777777777,null,new Date());
        Tb tb3 = new Tb(3,"赵六",2.777777777,null,new Date());
        List<Tb> list = new ArrayList<>();
        list.add(tb1);
        list.add(tb2);
        list.add(tb3);
        model.addAttribute("tblist",list);
        return "list";
    }
    @RequestMapping("/showTb")
    public String showTb(HttpSession session){
        Tb tb3 = new Tb(3,"赵六",2.777777777,null,new Date());
        session.setAttribute("tb",tb3);
        return "list";
    }
}
*/
